<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>伪元素选择器</title>
    <style>
        div {
            height: 100px;
            background-color: rebeccapurple;
        }
        div::after {
            content: "米饭";
            display: inline-block;
            height: 100px;
            line-height: 100px;
            background-color: #ff00d9;
        }
        div::before {
            content: "我";
            display: inline-block;
            height: 100px;
            line-height: 100px;
            background-color: #ffbf57;
        }
    </style>
</head>
<body>
<div>吃</div>
</body>
</html>